The present invention relates to a method and apparatus for measuring the distance of a surface from a reference plane. The present measuring system is particularly useful in applications involving measuring the working distance (WD) from a mask pattern on a semiconductor substrate to the objective lens of an inspection machine for maintaining this distance to be equal to the focal length of the objective lens.